home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / animtools / videotracker / vtutil1.lha / Imploder_Doc < prev    next >
Text File  |  1993-12-28  |  75KB  |  1,796 lines

  1. Peter van Campen: I had to put the manuals of this program in one
  2. file to save diskspace.
  3.  
  4. ***************************************************************************
  5.  
  6. This archive contains the Imploder 4.0 distribution.
  7.  
  8. -All files directly related to the Imploder have been moved into the
  9.  "Imploder" directory and subdirectories.
  10.  The Imploder allows you to reduce the size of executable files while having
  11.  them retain their full functionality.  There are other "crunchers" or
  12.  "packers" available for the Amiga, but none are as mindful of the
  13.  complexities of your Amiga system as the Imploder (IMHO). In addition to
  14.  this, its algorithms are more efficient, both in terms of speed, and size
  15.  reduction.
  16.  
  17. -The FInf drawer contains a versatile directory lister and file type
  18.  recognizer. This one is bursting with options, many of which are
  19.  sorely needed but not present in any of the other listing utilities
  20.  I know of. Of course it recognizes whether files are Imploded or not.
  21.  
  22. -The DImp drawer contains a disk-archiver that makes use of the Implosion
  23.  algorithm. Special features include the creation of self extracting and
  24.  explaining disk archives, support for any device with a floppy like track
  25.  layout, and the flexible selection of cylinder ranges.
  26.  
  27. ***************************************************************************
  28.  
  29. How to operate the Imploder should be fairly obvious to the average Amiga
  30. user. So I'll try to highlight only those aspects of the user interface
  31. that aren't immediately obvious, and of course this document will explain
  32. how certain selections influence the processing behaviour.
  33.  
  34.  
  35. ------------------
  36. The User Interface
  37. ------------------
  38.  
  39. ** Configuring the Imploder **
  40.  
  41. When you run the Imploder, either from the CLI or WorkBench, you'll notice
  42. the music and NTSC size screen. This setup is configurable by way of
  43. commandline switches or tooltypes. Note that, under Kick 1.3 or less, when
  44. one sets a tooltype using the WorkBench's info option, the appended "=" is
  45. required for proper recognition.
  46. The default setting is enabled music without modifications to the filter or
  47. NTSC/PAL mode. However, you can disable the music using the "NOMUSIC"
  48. commandline switch, or the "NOMUSIC=" tooltype. The lowpass filter can be
  49. disabled for less muffled sound by specifying "NOFILTER/NOFILTER=".
  50. To people with PAL Amigas, the shrunken NTSC screen might look ugly, however
  51. if there is a fat Agnus chip in your machine, it can be toggled from a 50Hz
  52. to 60Hz display refresh rate. Setting "NTSC/NTSC=" will cause the Imploder to
  53. do this whenever its screen gets upfront.
  54.  
  55. In addition to this, there's the SHORTROOT configuration switch. This
  56. option is related to using the library. See the "library" document for
  57. further information on this.
  58.  
  59.  
  60. ** The File Requester **
  61.  
  62. Whenever there exists the need to specify a filename, a directory window will
  63. appear in front of the message window. Only a few of its options need
  64. clarification:
  65. -Switching on the ID toggle gadget causes the directory window to display
  66.  the type ID's of all files. This is useful, for example, to check if files
  67.  have already been imploded. This option will increase the time needed to
  68.  access a directory though.
  69. -Clicking on the proportional scroll gadget on the left will cause the list
  70.  of filenames to be sorted.
  71. -Switching off the .INFO toggle gadget causes the directory window not to
  72.  display the *.info files used by the WorkBench's icon system. 
  73. -Selecting a file is done by placing the mouse pointer on top of its name and
  74.  clicking the left mouse button. In addition to the normal ways of confirming
  75.  your selection, you can double-click on a filename.
  76. -Next to the immediately obvious ways of scrolling through a long directory,
  77.  one can place the pointer within the filename window, press the left button,
  78.  and while holding it down move the mouse above or below the filename window,
  79.  try it; it works great once you get used to it.
  80. -One does not have to wait for the entire directory to load before selecting
  81.  a file or entering a sub directory.
  82.  
  83.  
  84. ** Keyboard Equivalents **
  85.  
  86. Many functions selectable by mouse also react to keys. The menu options have
  87. the usual right-amiga+key shortcuts. In addition to this;
  88. - Hitting any key removes the about requester displayed during startup.
  89. - Use the escape key to exit the Imploder.
  90. - The "S" key starts processing.
  91. - When the merge/compression parameter window is present, you can select
  92.   the compression mode using numeric keys, and increase/decrease the merge
  93.   threshold using the "+" and "-" keys. You can cancel using ESC and proceed
  94.   by hitting RETURN.
  95. - The deplode query requester reacts to the "Y" and "N" keys.
  96.  
  97.  
  98. ** Loading / Saving **
  99.  
  100. When you have specified a file for the Imploder to load, processing will
  101. commence (detailed below), and once finished the file requester pops up
  102. to query you for the destination.
  103.  
  104. The source and destination paths are maintained in a special way that
  105. minimizes the chance of the destination not being what one wants. You
  106. could e.g. implode files from one directory and store them in another,
  107. or overwrite them in the source directory.
  108. In the first case it would be annoying if the destination directory defaults
  109. back to the source; you'd have to change it every time you want to write an
  110. imploded file. In the latter case, it'd be annoying to change to a different
  111. source directory and find out that the destination still points somewhere
  112. else.
  113.  
  114. So the logic the Imploder uses is as follows; if you change to a different
  115. source directory, the destination directory will follow the source directory
  116. only if the destination is equal to the source.
  117.  
  118.  
  119. ** Batch Mode **
  120.  
  121. The Imploder can compress a series of executables by allowing you to specify
  122. multiple files by way of ?,#,* wildcards. All non-imploded executables
  123. matching the pattern will be processed. After entering the wildcards, the
  124. "merge and compression" parameter window will appear. The options present
  125. there will be explained below. The important thing to note here is that
  126. these selections will be global to all files processed during batch mode.
  127. Next, you'll be asked to specify a destination directory. This is were all
  128. batched executables will be saved after implosion.
  129.  
  130.  
  131. ----------
  132. Processing
  133. ----------
  134.  
  135. Now you're familiar with the user interface, let me get on with explaining
  136. how the Imploder processes programs. The implosion processing sequence
  137. consists of four steps;
  138. -Loading & Format Verification.
  139. -Hunk Merging & Reloc Table Cleanup.
  140. -Implosion.
  141. -Decompression code installation, Overlay table adjustment and Saving.
  142.  
  143.  
  144. ** The Loader **
  145.  
  146. The loader reads the selected file. During this process, the executable
  147. file is analyzed. Format defects cause the loader to either report an
  148. error, and abort processing, or to give a warning while ignoring or
  149. repairing the defect.
  150.  
  151. After having loaded a file, the "merge and compression" parameter window
  152. will appear. You can click the topright icon to collapse this window and
  153. review the status information produced by the loader.
  154.  
  155.  
  156. ** The Merger **
  157.  
  158. The merger is disabled by default. Most executables produced by modern
  159. compilers/linkers don't require this option, so if you're impatient
  160. you can skip to the next section.
  161.  
  162. If selected, the merger will try to coalesce the hunks in a program to hunks
  163. of upto the merge threshold in size. If used in a constrained manner, this
  164. will reduce the size of the program, and the chance of memory fragmentation.
  165. If you specify a large merge threshold however, the resulting file will need
  166. large contiguous regions of memory in order to load, thus reducing the chance
  167. of it being able to be loaded into a fragmented system.
  168.  
  169. Merging an executable file might break it. This is because certain programs
  170. make assumptions about the format of their segment list. The most notable
  171. members of this group are BCPL programs and a few libraries and devices.
  172. Hunk merging is therefore automatically disallowed for these. Still, some
  173. other programs, especially selfdetaching programs might dislike being merged.
  174.  
  175. Regardless of whether a program has been merged or not, a reloc table
  176. cleanup routine is executed upon the file. This deletes empty reloc tables,
  177. coalesces matching reloc tables, and finally sorts the relocation offsets.
  178. This is of no consequence to how the program will look after it has been
  179. decompressed and relocated.
  180.  
  181.  
  182. ** Compression **
  183.  
  184. The compression algorithm can operate either in turbo mode or in normal mode.
  185. The normal mode requires no additional memory, whereas the turbo mode needs
  186. some 300K of additional hashing buffers. The turbo mode kicks-in automatically
  187. whenever the required amount of additional memory can be allocated. It is
  188. about ten to twenty times faster than the normal implosion mode.
  189. Note that the parameter window will report whether or not the current memory
  190. configuration allows the turbo to be enabled or not. You might try to free a
  191. few resources in order to make the target. Whenever you select a compression
  192. mode (gadgets 0-8), the turbo capability will be reevaluated.
  193.  
  194. Various compression modes can be specified. These modes vary from zero
  195. (range  = 128 bytes) to eight (range = 18K). The range related to each
  196. compression mode determines the maximum distance searched while looking for
  197. redundant data. The higher compression modes therefore have a better chance of
  198. compressing data.
  199.  
  200. The time required to compress a program increases proportionally to the
  201. maximum distance in case of non-turbo operation. The processing speed during
  202. turbo operation however, is only slightly affected by varying the compression
  203. mode.
  204.  
  205. So it only makes sense to fiddle with the compression mode if you don't have
  206. enough memory to have the Imploder run in turbo mode, and therefore want
  207. to speed things up (at the expense of a the compression efficiency).
  208.  
  209. For all other instances it suffices to leave the compression mode at its
  210. maximum value (eight); for small executables the mode will automatically
  211. be scaled down to what the Imploder thinks is probably the most efficient
  212. one for the file at hand.
  213.  
  214. During compression, the level meters to the right will display various
  215. relevant parameters. Going from left to right these are:
  216.  
  217. 1. Percentage of program data still to be compressed.
  218. 2. New size of executable in % of the former size. Reevaluated continuously.
  219. 3. Skip. If a large chunk of non-compressable dat is encountered within
  220.    a program, its level will start to rise. When it hits the top, the
  221.    encoding limit has been exceeded. This is a rare occurance.
  222. 4. Length. Gives a measure of the redundancy of the data currently being
  223.    processed. High levels indicate good compression.
  224. 5. Distance. Gives a measure of the non-locality of current redundancy.
  225.  
  226.  
  227. ** Decompression Code Installation **
  228.  
  229. All imploded executables require some additional memory in order to be
  230. able to decompress. The additional amount of memory required is about 50%
  231. of the original program size plus a constant amount of buffer space depending
  232. on the compression mode, and never larger than 20K.
  233. After decompression this memory is freed without causing memory fragmentation.
  234. Furthermore, the normal distribution of program-data across hunks is retained.
  235. This allows for the loading of imploded files into fragmented memory, and
  236. the proper distribution of hunks across chip and fast memory.
  237.  
  238. The Imploder is able to install 3 different decompression algorithms into
  239. imploded executables;
  240. Library, Normal and Overlayed.
  241.  
  242.  
  243. LIBRARY IMPLODED files are the default, they are generated when;
  244. -The "Compress" gadget is enabled.
  245. -The "Library" gadget is enabled.
  246. -The processed executable isn't overlayed.
  247.  
  248. To be able to use library Imploded files, copy the explode.library to your
  249. LIBS: directory. When you run a library imploded program, the decompression
  250. code in this library will be called. The library code is fast and removes
  251. the need of appending decompression code to every imploded file.
  252.  
  253. The library has several special useful properties discussed in the "Library"
  254. document, but for simple use it suffices to make sure the library is in LIBS:.
  255.  
  256. Pure programs may be library imploded.
  257.  
  258.  
  259. NORMAL IMPLODED files are generated when;
  260. -The "Compress" gadget is enabled.
  261. -The "Library" gadget is disabled (this is NOT the default).
  262. -The program being processed isn't overlayed.
  263.  
  264. Normal imploded files have decompression code appended to them. A normal
  265. imploded program will run just like the original, and is independent; in
  266. contrast with library imploded files, normal imploded files don't require
  267. libraries or other special files to be present in your system.
  268.  
  269. Disadvantages of normal Imploded files are that they are a couple of hundred
  270. bytes larger than library Imploded files, and their decompression speed is
  271. significantly slower. This is due to need for space optimizations in the
  272. decompression code.
  273.  
  274. Once you normal-implode a pure program it's no longer pure.
  275.  
  276.  
  277. OVERLAYED IMPLODED files are generated when;
  278. -The "Compress" gadget is enabled.
  279. -the processed executable is overlayed.
  280.  
  281. Overlayed programs are executables with additional appended hunks that are
  282. loaded during runtime. The Imploder will automatically recognize whether a
  283. program is overlayed.
  284.  
  285. Overlayed files are rather loosely defined; basically the program is passed
  286. a bit of information that allows it to get at the appended hunks, but the
  287. means of doing so is left up to the programmer, though there is a standard
  288. technique specified by CBM which is used by the majority of overlayed
  289. executables.
  290.  
  291. Because the Imploder decreases the size of the file, the offset of the
  292. overlay data also changes, and this must be corrected for. The Imploder
  293. knows how to do this for the standard overlay format. You'll be notified
  294. when the format isn't as the Imploder expects.
  295.  
  296. Thus imploding overlayed files is not something which is guaranteed to
  297. succeed, so take heed; you should only implode overlayed files when you
  298. know what you are doing, and are willing to verify the results.
  299.  
  300.  
  301. ---------
  302. Deplosion
  303. ---------
  304.  
  305. If you select an already imploded executable for processing (the ID gadget
  306. in the directory window allows you to see if files have already been imploded,
  307. at the cost of slower listing), you will be asked if you want to deplode it.
  308. If you confirm this query, the executable will be restored to a normal
  309. non-imploded format. Note that this format isn't necessarily bitwise
  310. identical to the original; the reloc tables are sorted, and you might
  311. have applied hunk merging (which is irreversible). Also, any symbol or
  312. debug hunks present in the original will have been stripped.
  313. Still, if you run the program, things will look the same to it, and
  314. this is ofcourse what counts.
  315.  
  316. Note that there is a CLI based "Deplode" command available in the Tools
  317. directory which does basically the same thing. This is purely a matter of
  318. convenience ment for people that think of the CLI as convenient.
  319.  
  320. ***************************************************************************
  321.  
  322. The Imploder was conceived, written and performed by:
  323.  
  324. Albert-Jan Brouwer    -    Programming, documentation.
  325. Peter Struijk        -    More programming, less documentation.
  326. Paul van der Valk    -    Music-programming and composition.
  327. Erwin Zwart        -    Graphics, aesthetic lay-out.
  328.  
  329.  
  330. Please direct queries, comments, bug reports, and other things that can
  331. not be resolved by rtfming to:
  332.  
  333. UUCP hp4nl.nluug.nl!cbmnlux!ecl001!ajbrouw
  334. UUCP cbmvax.commodore.com!cbmehq!cbmnlux!ecl001!ajbrouw
  335. FIDO: 2:281/614 (up for freq sometime fall '91)
  336.  
  337.  
  338. Legal mush:
  339.  
  340. The Imploder is Freely-Distributable, as opposed to Public Domain.
  341. Permission is given to freely distribute this program provided you
  342. include this documentation and other related files, and no fee is
  343. charged in excess of reasonable media and mailing costs.
  344. All programs in this distribution have been enforced and mungwalled.
  345.  
  346.  
  347. P.S.
  348.  
  349. We've been promising a 4.0 version for over a year now, well here it
  350. is. Things got delayed slightly. We apologize for the inconvenience.
  351.  
  352. ***************************************************************************
  353.  
  354.  
  355.  
  356. Changes V3.0 -> V4.0
  357. --------------------
  358.  
  359.  
  360. Major:
  361.  
  362. - Finally a complete and up-to-date well documented release with all
  363.   of the support utilities.
  364.  
  365. - Basic support for batchmode processing.
  366.  
  367. - Radical new music composition by Paul van der Valk.
  368.  
  369. - Erwin Zwart has completely redesigned the graphics to conform to the
  370.   2.0 look. Aesthetics and functionality have improved significantly.
  371.  
  372. - Defaults to support for a "safe library root". This is larger startup code
  373.   for library imploded files that warns when no library is present. You can
  374.   override this setting.
  375.  
  376. - The "Protect" option has been discontinued. See the "philosophy" document
  377.   for the rationale on this.
  378.  
  379. - Mouse hater support by way of a CLI based Deplode command, and keyboard
  380.   equivalents throughout.
  381.  
  382.  
  383.  
  384. Minor:
  385.  
  386. - Support for "pure-imploded" files removed; If you know how to make a
  387.   program resident, you know how to use the library.
  388.  
  389. - The "Library" gadget now defaults to on. 
  390.  
  391. - The "Merge" gadget now defaults to off. Improved compilers/linkers
  392.   plus the much more frequent appearance of selfdetaching programs have
  393.   made this option less important and more dangerous respectively.
  394.  
  395. - Added tooltypes and commandline switches for specifying the setup
  396.   options.
  397.  
  398. - The copperlist has been tuned down a bit, and the screen is now
  399.   dragable.
  400.  
  401. - The explode.library has been enhanced/sped up a bit.
  402.  
  403. - Removed bug that caused Intuition to read from location zero. This would
  404.   occasionally crash the machine when location zero was nonzero.
  405.   This bug was already removed in V3.1 (thanks to Arnout).
  406.  
  407. - All stuff has been enforced and mungwalled so now we've even better
  408.   confirmation that no serious bugs are present.
  409.  
  410. - Improved overlay file recognition. No longer expects overlayed files to
  411.   have additional space in the hunk table. Searches for the magic longword.
  412.  
  413. - Decodes ARP resident program tags. Warns against stack gobblers.
  414.  
  415. - Data hunk ID now preserved upon deplosion. Inconsequential, yet neater.
  416.   Very stringent format checks in the old deplosion routine barf on the
  417.   extra bit required for this, but the old explode library doesn't mind,
  418.   so in that sense it is backwards compatible.
  419.  
  420. - Lots of other small changes.
  421.  
  422. ***************************************************************************
  423.  
  424.  
  425.     Introduction
  426.     ============
  427.  
  428. The Imploder allows you to reduce the size of executable files while having
  429. them retain their full functionality.  There are other "crunchers" or
  430. "packers" available for the Amiga, but none are as mindful of the
  431. complexities of your Amiga system as the Imploder (IMHO). In addition to
  432. this, its algorithms are more efficient, both in terms of speed, and size
  433. reduction.
  434.  
  435. Basic operation is clicking and using pull-down menus. Though operating
  436. the Imploder isn't hard, the complexities of the Amiga give rise to the
  437. need for imploding different types of executable files in a number of
  438. different ways. Please note that not reading the documentation won't
  439. inhibit you from using the Imploder; it automatically detects, and reacts
  440. to almost all exceptions, and for the vast majority of files it suffices
  441. to simply hit the "Proceed" gadget after loading has finished. 
  442.  
  443. Still, the Imploder does have a few - quite useful - options that require
  444. you to have some understanding of the issues involved. Notably, it would
  445. be preferable for you to read the documentation before making use of the
  446. explode library or the merge option.
  447.  
  448. ----
  449.  
  450. Judging from some of the reactions we've received, the old documentation
  451. didn't do a good job in communicating essential information to the user,
  452. so it has been revised and split into several parts for easy reference.
  453.  
  454. Here's a list:
  455.  
  456. - Authors;
  457.   About the authors, legal status, distribution etc.
  458.  
  459. - Changes;
  460.   Highlights, newly implemented features and future intentions.
  461.  
  462. - Manual;
  463.   How to operate the Imploder.
  464.  
  465. - Library;
  466.   Information on the explode.library and related issues.
  467.  
  468. - Techno;
  469.   Some in-depth information on the Imploder's internals for those tech
  470.   types that want to know it all.
  471.  
  472. - Philosophy;
  473.   This discusses the Imploder's design choices and intended use.
  474.  
  475. ***************************************************************************
  476.  
  477.  
  478. ** Features **
  479.  
  480. Library-imploding files is preferable, not only because the result is
  481. smaller, but also because the library is faster, and able to patch the
  482. AmigaDOS executable file loader (LoadSeg), thus decompressing ANY type
  483. of load file as soon as it is loaded into memory, e.g. fonts, devices,
  484. libraries, etc.
  485.  
  486. If you only library-implode program files, the library will be loaded
  487. when you run a library imploded program for the first time. However if
  488. you wish to implode non-program executables, you'll have to make sure
  489. the library is already resident because these won't load properly until
  490. LoadSeg has been wedged. If you're not yet using the 2.0 OS, there is a
  491. slight complication explained in the section at the end of this document.
  492.  
  493. To make sure the library is resident, we've provided a small program that
  494. can be run at the head of your startup sequence. It's called "ExpLoad"
  495. and resides in the tools subdirectory. All it does is open the explode 
  496. library. Once this is done, the library hooks itself into DOS and remains
  497. resident, even when a system flush occurs.
  498.  
  499. Note that it suffices to run a library imploded program to make the
  500. library resident, but this is less visible so you might forget about it
  501. when you modify your startup-sequence later on.
  502.  
  503. Once you've made sure the library is resident, you may merrily go around
  504. your system and library-implode libraries, devices, fonts and even keymaps!
  505.  
  506. By default the Imploder appends a foolproof piece of startup code to
  507. library imploded files. This checks whether the library is present.
  508. If not it will print an error. If started from the WorkBench a tiny
  509. window will be opened to display the error message.
  510.  
  511. However this error checking takes up a bit of space, and is redundant
  512. when you make sure the library is resident. For this reason you can
  513. specify the SHORTROOT tooltype/switch. When set, the Imploder will
  514. append only short startup code to library imploded files. This saves
  515. about 250 bytes for every executable.
  516.  
  517. If library imploded programs with a short root do not find the explode
  518. library they will keep on trying to open it until they succeed. These
  519. programs will therefore hang until the LIBS: directory contains the
  520. library.
  521.  
  522. Still, using the SHORTROOT switch has its advantages. The reason it is not
  523. enabled by default is to make sure that people have read this document
  524. first.
  525.  
  526.  
  527. ** Pre-2.0 problems **
  528.  
  529. If you are NOT using 2.0 or some newer OS, there are a few additional
  530. problems related to BCPL braindeadness, so if you're still running 1.3 or
  531. less, READ THIS!
  532.  
  533. Under a pre 2.0 OS, if you run a library imploded program generated with
  534. the SHORTROOT option from the WorkBench, while the library hasn't been made
  535. resident yet, the system will guru. This is a problem caused by the OS.
  536. The default library startup code checks for this condition, and will exit
  537. cleanly after reporting an error.
  538.  
  539. So under 1.3 or less it is advisable to make the explode.library resident
  540. before the WorkBench is active, e.g. early in your startup sequence, even
  541. when you're using library imploded non-program executables;
  542. The first invocation of a library imploded program might happen from the
  543. WorkBench.
  544.  
  545. In addition to this it is best not to library implode handlers under pre
  546. 2.0. See the Techno document for an in depth explanation of these issues.
  547.  
  548.  
  549. ** Conclusion **
  550.  
  551. Library implosion limits the possibility of passing on one's executables
  552. to other people/systems who/that do not have the explode.library installed.
  553. I think this doesn't really matter because I strongly believe people
  554. should be left the option of deciding in what way, if at all, they are
  555. going to compress/install executables. (See the "Philosophy" document
  556. for a more extensive discussion of this issue).
  557.  
  558. Evidently, using library imploded files is the most transparent to the
  559. system. We personally recommend using mostly library implosion, and only
  560. in special cases normal implosion, or overlay implosion for the odd
  561. overlayed file one might encounter.
  562.  
  563. ***************************************************************************
  564.  
  565.  
  566. This doc may sound slightly grumpy in places, still this is how we feel about
  567. things, so there ;-)
  568.  
  569.  
  570. Intended use
  571. ------------
  572.  
  573. The Imploder is intended for creating extra space on your system disk
  574. while maintaining full functionality. To achieve this goal, we've tried
  575. to make the decompression process as invisible and fast as possible.
  576.  
  577. Thus the Imploder doesn't support any annoying colour flashing, and it
  578. has a high speed of decompression. On a vanilla 68000 Amiga, "explosion"
  579. speed is about 30-50 K/s, depending on the type of compressed code. Also,
  580. the explode.library is a bit faster than the explosion routines appended
  581. to stand-alone "imploded" files.
  582.  
  583. You should take this speed issue into consideration when determining which
  584. executables to implode. For floppy users, the startup times will mostly be
  585. FASTER. Users with fast harddrives however might want to limit themselves
  586. to imploding only infrequently used executables. It is therefore very
  587. useful to floppy users, yet harddrive users can also add a few megs to
  588. their bit budget.
  589.  
  590. Evidently, the optimum use of the Imploder will vary from system to system.
  591. A3000 owners for example won't even be able notice programs exploding.
  592.  
  593. Because of this, over the years, the emphasis of the Imploder's intended
  594. use has moved away from Imploding being a once in a program's life time
  595. operation, suitable e.g. when an author wants to distribute his program.
  596. Instead we now feel that every user should be able - when installing a
  597. program - to decide whether or not to implode it, and in what way.
  598.  
  599.  
  600. The user's responsibility
  601. -------------------------
  602.  
  603. So the issue here is freedom of choice. And it is responsibility of the
  604. user to apply the Imploder in a sensible fashion.
  605.  
  606. To get a feel for what I'm talking about simply look at what happened
  607. when people started distributing Power-Packed text files. Many people
  608. didn't like using the PPMore reader or simply didn't have it. This
  609. kind of thing can be utterly annoying, and the Imploder has the
  610. potential for the same kind of abuse.
  611.  
  612. We therefore recommend limiting the use of the Imploder to compressing
  613. things installed in your system. So if you must pass on a program to
  614. someone else, use the original archive. This keeps everyone happy,
  615. including the program's author.
  616.  
  617. Another point is that when receiving programs from PD sources, people
  618. should be able to easily check if programs contain file viri or other
  619. unwanted things. If an executable is imploded it'll have to be deploded
  620. before one is able to examine the code. So don't distribute compressed
  621. executables of _any_ type.
  622.  
  623. Still, there was one action we could take to encourage the kind of use
  624. we recommend;
  625. In previous versions one could select a "protect" option that prevented
  626. a program from being deplodable. The intent of this option was to protect
  627. an author's work before he distributed it. In reality people started using
  628. it to protect dirty hacks or programs containing file viri.
  629.  
  630. Evidently this is incompatible with our philosophy. Thus, the support for
  631. protecting programs has been discontinued as of version 4.0. In addition
  632. to this, the Imploder now allows decompression of any protected files
  633. left over from the past.
  634.  
  635. ***************************************************************************
  636.  
  637. This document deals with the inner workings. If you're a tech type, and are
  638. interested in somewhat deeper lying aspects relating to how the Imploder
  639. operates, chances are you'll find it here.
  640. Subjects covered are:
  641.  
  642. - Compression
  643. - Decompression
  644. - Reversibility
  645. - The Library
  646. - Overlayed Files
  647. - Merging
  648. - ARP
  649. - The Music
  650. - The Copperlist
  651. - 68040 Cache Coherency
  652.  
  653.  
  654. ** Compression **
  655.  
  656. The Imploder (we only recently learned :-) does LZ77 like compression with a
  657. per-mode static Huffman coding step on the various parts of the skip, offset
  658. and length tuples. Due to the efficient encoding, a tuple can require less
  659. than 12 bits, and thus strings of 2 bytes length are encodable with a decent
  660. gain (given small Huffman patterns corresponding to likely circumstances).
  661.  
  662. To speed up the string searching, the turbo mode causes the accessible strings
  663. to be indexed using a hashing table. However, the fact that strings with a
  664. minimum size of two bytes are still potential candidates for compression,
  665. requires the hashing function to necessarily be rather simplistic. When the
  666. implosion algorithm processes highly redundant data, entries in the hashing
  667. table tends to get very imbalanced, causing a reduction in performance.
  668. For most types of data, notably executables, this isn't the case though.
  669.  
  670.  
  671. ** Decompression **
  672.  
  673. The goal of decompression is to reproduce the segment list of the
  674. original program. This is a linked list of data/code/bss hunks, some
  675. of which require being positioned in chip memory.
  676.  
  677. The decompression code will have to fill the data and code hunks with
  678. the decompressed data, and, if required, perform relocation of absolute
  679. references.
  680.  
  681. The Imploder lets LoadSeg allocate all target hunks (as BSS). These
  682. are at the start of the hunk list. This is followed by a hunk with
  683. the decompression code (only for non-library imploded programs),
  684. a compressed data hunk (normally about 50% of the static data size,
  685. depending on compression gain ofcourse), and a decompression buffer
  686. (only upto 17K in size).
  687. As you can see, no allocations need to be done, so the exploding
  688. process will never fail.
  689.  
  690. During decompression time, data is decompressed from the compressed data
  691. buffer into the decompression buffer until it has filled. It then empties
  692. this buffer by filling hunks and processing reloc tables.
  693. When the buffer has been emptied, the process repeats until all data has
  694. been scatter-decompressed across the target hunks.
  695.  
  696. Now you might ask, why not directly decompress to the target hunks
  697. instead of using a decompression buffer?
  698. This is because the the Imploder uses the decompressed data to
  699. decompress, and needs to be able to easily access it (for speed).
  700. Referencing data distributed across several hunks is much more
  701. cumbersome.
  702.  
  703. An added bonus of having separate source and target memory regions is that
  704. a notation can be used that doesn't gain under rare circumstances, but on
  705. average yields better results (No chance of source/target pointer
  706. collision).
  707.  
  708. When explosion has finished, the decompression buffer, code and data
  709. hunks are freed, and memory usage reduced to what it would have been
  710. for a non-imploded version of the program.
  711.  
  712. People often compare the Imploder to the Power Packer. The Imploder
  713. decompresses faster and looks cooler [:-)], but the most interesting
  714. differences lie in the implementation of the various steps of the
  715. decompression proccess. So let's contrast the advantages of the
  716. Imploder's approach with the Power-Packer's implementation.
  717.  
  718. - By having LoadSeg allocate all memory as BBS hunks, explosion will
  719.   never fail.
  720.   The Power-Packer on the other hand allocates hunks. If it fails it
  721.   will simply exit. Power Packed programs launched from the WorkBench
  722.   thus won't reply the startup message, which will be left dangling in
  723.   memory forever.
  724.  
  725. - Memory doesn't get fragmented. The explosion related hunks are at
  726.   the end of the seglist and thus were allocated (by LoadSeg) AFTER
  727.   the target hunks.
  728.   This isn't true for the Power-Packer. It does leave a hole in your
  729.   free memory list when it frees its decompression stuff.
  730.  
  731. - Additional memory usage is only about 50% of the static data size +
  732.   the size of the decompression buffer, which is always small relative
  733.   to large programs (maximum 17k).
  734.   So a 30K program might require 62K to decompress (30+15+17), a 300K
  735.   program will require 467K (300+150+17), assuming a 50% compression
  736.   reduction.
  737.   The memory usage report generated after a program has been imploded
  738.   includes BSS hunks. I've discussed only static data here. BSS hunks
  739.   don't require any extra memory usage of course.
  740.   Power-Packed files require a buffer as large as the original program
  741.   for both compressed data storage and decompression. Memory usage is
  742.   therefore always about twice the static data size (again ignoring BSS)
  743.   while for the Imploder it drops to 1.5 for executables large enough to
  744.   matter memory wise.
  745.  
  746. (In this comparison I'm talking about executables as produced
  747.  by Power-Packer version 3.0b.)
  748.  
  749. Non-library imploded programs have a small first hunk that calls the
  750. decompression code hunk at the end, and frees these last three hunks. 
  751. For library imploded programs this freeing occurs in the library, so no
  752. preceding hunk is needed.
  753.  
  754.  
  755. ** Reversibility **
  756.  
  757. Before compression the Imploder preprocesses executables. It kicks out all
  758. the redundant stuff by merging subreloc tables referring to the same hunk,
  759. sorting relocs (improves compression), removing debug symbols etc. etc.
  760. This is what all those info blurbs in the text window are about.
  761.  
  762. So the deploded executable isn't guaranteed to be byte by byte identical
  763. as far as loadfile control codes are concerned.
  764.  
  765. What is guaranteed is that the memory images created when the original,
  766. imploded and deploded program versions are loaded are identical.
  767.  
  768. So the deplosion process isn't 100% reversible. Normally this is no
  769. problem. The reason for uncrunching is mostly wanting to recompress
  770. an executable using a different compression mode, or having a quick
  771. peek at the code e.g. when applying a patch with something like
  772. NewZap.
  773. If however you expect to need the debug symbols, or (important)
  774. require the executable to be in the _exact_ original format in order
  775. to have things like lpatch updates to applied, you're out of luck
  776. if you've only got the compressed executable. So always keep the
  777. original archives/disks!
  778.  
  779. This is yet another argument for retaining the original archives.
  780. The Imploder is an online space creator not a distribution
  781. archiver (See the "Philosophy" text).
  782.  
  783.  
  784. ** The Library **
  785.  
  786. The library code has been unrolled a bit, and optimized here and there
  787. in order to achieve optimal performance. This makes it faster than the
  788. normal explosion algorithm.
  789.  
  790. If you library implode a program there is NO way in which the program,
  791. after explosion, will be able to notice. If you make sure the library
  792. is resident, this is also true for any executable file loaded for any
  793. purpose by any program.
  794.  
  795. For normal etc. imploded programs the startup/cleanup hunk mentioned
  796. at the end of the "decompression" section might be detected if a program
  797. goes through contortions involving finding the segment list via murky
  798. DOS structures instead of simply doing PC relative hunk start referencing
  799. which also works from the WorkBench.
  800. I haven't encountered any programs that do this. Still this is yet another
  801. reason to use the library; there is not even the slightest chance of it
  802. being incompatible with an executable.
  803.  
  804. Note that the Loadseg vector is patched in an "intelligent" manner; it
  805. will install fine for pre 2.0 kickstarts (braindead jumptable format)
  806. as well as in BCPL free systems (2.0+)
  807.  
  808. Under pre 2.0, when a library imploded file is run from the WorkBench, and
  809. the explode.library isn't resident yet, Exec will try to load the library
  810. from disk. The process's message port however is in use by the WorkBench
  811. reply message, and until it has been replied, it cannot be used by the
  812. DOS in order to send packets. Thus the DOS gurus.
  813.  
  814. Also, BCPL code doesn't jump through the the library vector. The only
  815. structural problem with this are handlers. These are loaded by the DOS,
  816. and the DOS is BCPL code, again ONLY under < 2.0. Under 2.0 the library
  817. works just like intended when it was first conceived. Transparently that
  818. is.
  819.  
  820.  
  821. ** Overlayed Files **
  822.  
  823. The Imploder compresses the load part of an overlayed file as if it were a
  824. normal executable file. Subsequently, the overlay table and the overlayed
  825. program section are appended.
  826. It then tries to adapt the overlay table. Because different types of
  827. overlay supervisors are in use, the format of the overlay table isn't
  828. known to the Imploder. The only assumption made is that the overlay table
  829. contains seek-offset longwords, at longword aligned locations, that point
  830. into the file to the hunk_header ($3F3) identifiers of the overlayed
  831. program sections.
  832. This is how the standard overlay manager operates, but nothing prevents
  833. a programmer with sufficient technical knowledge to create a novel overlay
  834. format (e.g. selfextracting DImp files).
  835.  
  836. If the Imploder finds one of these offsets, it is adjusted by the amount
  837. the initial load part of the executable file has compressed.
  838. The deplosion algorithm also tries to find these offsets when restoring the
  839. overlay table. Thus there is always a very small chance that the imploder
  840. will adapt a longword that was never meant to be an offset.
  841.  
  842. An overlayed file gets its information from the loader in four longwords,
  843. at the start of the first hunk. In an imploded overlayed file, this hunk is
  844. the root hunk, and after decrunching these longwords are adjusted and moved
  845. into the first hunk of the actual program (the second hunk of the seglist).
  846.  
  847. Evidently this process can never be 100% deterministic, so take heed and
  848. test any overlayed programs you've Imploded. Or don't use overlay implosion
  849. at all if you can spare the bits.
  850.  
  851.  
  852. ** Merging **
  853.  
  854. Though modern linkers/compilers typically produce executables with one code
  855. hunk and one data hunk, there are still some old executables and less evolved
  856. linkers around. The merging option was implemented when executables with
  857. sufficient hunks to cause a lot of redundancy were still commonplace.
  858.  
  859. Every hunk requires a longword in the allocation header, plus a hunk ID,
  860. load size, and hunk end ID. That's 16 bytes per hunk, and thus saved for
  861. every merge action. Doesn't sound like much, but generally hunks also
  862. have reloc tables. These waste a lot more space, especially with references
  863. to a lot of different hunks, though there's no easy equation.
  864.  
  865. The merging step merges matching hunks (data-data, chipdata-chipdata,
  866. code-code) into hunks of upto the merge threshold in size. The actual
  867. size is of course determined by the sum of the sizes of the composite hunks,
  868. and may very well be a bit less than the specified threshold.
  869.  
  870. Obviously this process discards redundant data in an irreversible fashion,
  871. so deploding the executable won't reverse it.
  872.  
  873. Lots of tiny hunks cause memory fragmentation, but increase the chance of
  874. the program being able to load when the system is fragmented, and low on
  875. memory. Thus there is a kind of optimal balance that varies from system
  876. to system. In general it can be said that hunks less than 10K or more than
  877. 100K are "bad".
  878.  
  879. Another factor is that loading a program with many tiny hunks causes the
  880. LoadSeg function to issue double as many tiny read commands, thus bogging
  881. down the speed with which an executable can be loaded into memory.
  882.  
  883. For simplicity's sake, I've chosen for the Imploder to process executables
  884. within a single buffer, without the need for additional backup buffers.
  885. Thus, removing redundant information, and copying hunk data during the
  886. merging and reloc cleanup process involves moving or mirroring large parts
  887. of the buffer. This is why merging can take a while when processing a large
  888. executable with a hundred or so hunks.
  889.  
  890.  
  891. ** ARP **
  892.  
  893. Programs written for use with the ARP shell are able to specify the
  894. stacksize they require inside the first hunk of their executable. If
  895. such a program is normal or pure imploded, the segment list won't become
  896. visible until the program is run. Thus ARP has no way of finding out what
  897. the proper stacksize should be.
  898. Library imploded programs have no trouble with this because they are
  899. already decrunched after they are loaded into memory with LoadSeg.
  900. (Provided the library has already been made resident.)
  901.  
  902. The Imploder will recognize these files and report on them. If the
  903. requested stack-size is larger than the usual minimum (4000 bytes)
  904. a warning will be printed, and you'll be urged to use only library
  905. implosion.
  906.  
  907. The chance of a programmer relying on a soon to be obsolete shell for
  908. setting a stack LARGER than the usual default is rather slim though.
  909. It would have been very nice if 2.0 had sported such a stack setting
  910. feature, and indeed it had been planned, but was never implemented due
  911. to lack of time on the part of the Commodore programmers.
  912.  
  913. We'll be on the lookout for any future changes to the executable file
  914. format in order to fix any potential incompatibilities before they'll
  915. cause problems.
  916.  
  917.  
  918. ** The Music **
  919.  
  920. When we got word the CIA-A timer was used by the OS under 2.0, we switched to
  921. trying to allocate first CIA-A and if not available CIA-B to drive the music.
  922. However the CIA-B interrupt priority is too high and can interfere with things
  923. like serial transfer. So Paul got this great idea to keep on using a CIA for
  924. precision timing purposes, but drop down to a SoftInt for doing the actual
  925. work, modulations, etc. This works great, the amount of code executed under
  926. CIA priority is now negligible.
  927. Recently, the CATS started feeling guilty about hijacking the CIA-A timer and
  928. thus created "Jumpy the magic timer device". If I understood things correctly
  929. the latest 2.0 timer device moves out of the way and starts using a less
  930. accurate timing source whenever an application tries to allocate the CIA-A.
  931. Pauls music driver can run of both CIA-A and CIA-B, and it would be a pity
  932. to make Jumpy jump without good reason, so he changed the alloction sequence
  933. from A-B to B-A.
  934.  
  935.  
  936. ** The Copperlist **
  937.  
  938. There are a couple of unavoidable quirks when one uses copperlists on Intuition
  939. screens. On certain machines, probably PAL, under certain circumstances, dragging
  940. a dense copperlist past scanline 256 or so will cause some video crud to appear
  941. at the top of the display. This can't hurt, but it sure does look ugly. I suspect
  942. this is a hardware misfeature because it ain't fixed yet under 2.0
  943. This was the reason why the screen of older Imploder versions wasn't draggable;
  944. you might just think this muck was our doing.
  945.  
  946. Second problem is that copperlists "shine through" onto other screens in front.
  947. For this reason we've choosen a colour > 4 for the level bars, so this is never
  948. observable with screens less than 3 bitplanes deep.
  949. The 2.0 OS support proper copperlist clipping, but it has been disabled by
  950. default for compatibility reasons (yeach). Supposedly there is a bit somewhere
  951. in the graphics base to turn this back on, so I'm sure, in due time, there will
  952. be some preference editor to re-enable this.
  953.  
  954.  
  955. ** 68040 Cache Coherency **
  956.  
  957. With the advent of the 68040 processor, programs that diddle with code which is
  958. subsequently executed will be prone to some problems. I don't mean the usual
  959. self-modifying code causing the code cached in the data cache to no longer
  960. be as the algorithm expects. This is something the Imploder never had a
  961. problem with, indeed the Imploder has always worked fine with anything
  962. upto and including an 68030.
  963.  
  964. The reason the 68040 is different is that it has a "copyback" mode. In this
  965. mode (which WILL be used by people because it increases speed dramatically)
  966. writes get cached and aren't guaranteed to be written out to main memory
  967. immediately. Thus 4 subsequent byte writes will require only one longword
  968. main memory write access. Now you might have heard that the 68040 does
  969. bus-snooping. The odd thing is that it doesn't snoop the internal cache
  970. buses!
  971.  
  972. Thus if you stuff some code into memory and try to execute it, chances are
  973. some of it will still be in the data cache. The code cache won't know about
  974. this and won't be notified when it caches from main memory those locations
  975. which do not yet contain code still to be written out from the data caches.
  976. This problem is amplified by the absolutely huge size of the caches.
  977.  
  978. So programs that move code, like the explosion algorithms, need to do a
  979. cache flush after being done. As of version 4.0, the appended decompression
  980. algorithms as well as the explode.library flush the cache, but only onder OS
  981. 2.0. The reason for this is that only OS 2.0 has calls for cache-flushing.
  982.  
  983. This is yet another reason not to distribute imploded programs; they might
  984. just cross the path of a proud '40 owner still running under 1.3.
  985.  
  986. It will be interesting to see how many other applications will run into
  987. trouble once the '40 comes into common use among Amiga owners. The problem
  988. explained above is something that could not have been easily anticipated
  989. by developers. It is known that the startup code shipped with certain
  990. compilers does copy bits of code, so it might very well be a large problem.
  991.  
  992. ***************************************************************************
  993.  
  994. Deplode is a CLI command that allows you to quickly "deplode" imploded
  995. executables.
  996.  
  997. Usage: Deplode <source> [target]
  998.  
  999. If no target filename is specified, the sourcefile will be overwritten with
  1000. its deploded counterpart.
  1001.  
  1002.  
  1003. ***************************************************************************
  1004.  
  1005.  
  1006.     Disk Imploder V2.27 by A.J.Brouwer.  FreeWare
  1007.     ---------------------------------------------
  1008.  
  1009.  
  1010. NAME
  1011.     DImp - Archives cylinders.
  1012.  
  1013.  
  1014. SYNOPSIS
  1015.     DImp READ <SourceDrive> Ca[-Cb,Cc,..] <TargetFile> [-M?|-NB|-NC|-X] [+Readme]
  1016.       The collection of cylinders to be read must be specified by ranges, Ca-Cb,
  1017.       and/or single cylinders, separated by commas.
  1018.       -M? or MODE?    = Compression mode, ? = 0-7, default = 5
  1019.       -NB or NOBITMAP = Ignore bitmap (normally unused blocks are cleared)
  1020.       -NC or NOCOMP   = Do not compress cylinders
  1021.       -X  or EXE      = Create self-extracting overlayed executable
  1022.       +"Name of Readme file to be displayed during WRITE"
  1023.     DImp WRITE <DImpFile> <TargetDrive>
  1024.     DImp INFO <DImpFile>
  1025.     DImp ABOUT
  1026.     DImp will use ".dmp" or ".dex" filename extensions when trying to
  1027.     create or recognize DImp data files.
  1028.  
  1029.  
  1030. DESCRIPTION
  1031.       DImp allows you to compress a subselection of cylinders from
  1032.     any floppy compatible device into a file.  DImp is fast and
  1033.     sports a good compression ratio.  Notably, DImp allows you to
  1034.     create a self extracting file with an appended readme text,
  1035.     thus providing you with a completely self-contained method of
  1036.     distributing a disk's contents in a file.
  1037.  
  1038.        There are four operation mode keywords; "READ" specifies
  1039.     that cylinders must be read, "WRITE" indicates that you wish to
  1040.     write cylinders encoded in a dimped file, "INFO" displays
  1041.     information about the contents of a file containing dimped
  1042.     cylinders, and "ABOUT" should be obvious.
  1043.  
  1044.       The cylinders are individually compressed, checksummed and
  1045.     stored, thus, in case of a transmission error, valid cylinders
  1046.     can be undimped, and the originator can then select, dimp and
  1047.     retransmit the faulty cylinders.
  1048.  
  1049.       The cylinders to be READ can be selected by entering cylinder
  1050.     numbers separated by commas, or a dash if you wish to specify
  1051.     a range of cylinders.
  1052.  
  1053.       When reading or writing, DImp can handle any device that
  1054.     supports the normal floppy 2 heads 11 sectors etc. layout,
  1055.     thus it is usable with f.e a RAD: or an FMS disk.  You can omit
  1056.     the colon normally following these device names.
  1057.  
  1058.       Additional options include compression mode selection override.
  1059.     Given the fact that the tracks are compressed individually, the
  1060.     default mode 5 has a pretty optimal compression ratio, though
  1061.     the ratio isn't as good as it might have been if cylinder data
  1062.     had been treated as a continuous stream.  This is a design choice
  1063.     intended to allow the aforementioned flexible handling of
  1064.     individual cylinders.
  1065.  
  1066.       If there's sufficient free memory, DImp will allocate buffers
  1067.     for a turbo compression algorithm.  Also, reducing the crunch
  1068.     mode will speed things up, dramatically so if you don't have
  1069.     sufficient free memory for DImp to run in turbo mode.  Lowering
  1070.     the crunch modes results in less efficient compression though.
  1071.  
  1072.       Next, there are a couple of option switches.  NOBITMAP
  1073.     prevents DImp from discarding data that, according to the disk's
  1074.     bitmap, isn't used by the filing system.  This option is rarely
  1075.     needed.  If you suspect a disk to contain a program that uses a
  1076.     low level routine to read its information from that disk, this
  1077.     option might be required to prevent loss of relevant data.
  1078.     NOCOMP disables compression.  EXE causes DImp to generate self
  1079.     extracting dimp files.  These can be executed, and will write
  1080.     their contents to a disk selected by the user.  Executable DImp
  1081.     files (.dex filename extension) can be treated as normal DImp
  1082.     files (.dmp filename extension) in that you can use DImp to
  1083.     WRITE these, or get INFO on them.
  1084.  
  1085.       Lastly, you may specify a filename containing text to be
  1086.     displayed during the writing or self-extraction of the dimp file
  1087.     you're creating.  This allows you to include a fairly extensive
  1088.     comment on the contents of the disk.  This readme filename must
  1089.     follow a "+" commandline indicator.
  1090.  
  1091.  
  1092. EXAMPLES
  1093.     DImp READ rad 0-79 Work:Cylinders EXE +ram:blahblah
  1094.  
  1095.  
  1096. TECHNOCRAP
  1097.       The self-extracting executable files generated by DImp are
  1098.     overlayed.  This allows for the cylinder data to be spooled
  1099.     during the self-extraction process, resulting in much more
  1100.     modest memory requirements than the size of the executable
  1101.     would lead one to suspect.
  1102.  
  1103.       Thanks to resource tracking, transparent error management,
  1104.     modular algorithm linking, and sitting on the program for
  1105.     several years before releasing it, DImp should be very robust
  1106.     and return sensible error messages.
  1107.  
  1108.     DImp is pure and can be made resident.
  1109.  
  1110.  
  1111. AUTHOR
  1112.     Albert-Jan Brouwer 
  1113.     UUCP hp4nl.nluug.nl!cbmnlux!ecl001!ajbrouw
  1114.     UUCP cbmvax.commodore.com!cbmehq!cbmnlux!ecl001!ajbrouw
  1115.     FIDO: 2:281/614 (up for freq sometime fall '91)
  1116.  
  1117. ***************************************************************************
  1118.  
  1119.  
  1120. File Imploder V2.33 by A.J. Brouwer
  1121. ===================================
  1122.  
  1123. This program is Freely-Distributable, as opposed to Public Domain.
  1124. Permission is given to freely distribute this program provided you
  1125. include this documentation and any other related files, and no fee
  1126. is charged in excess of reasonable media and mailing costs.
  1127.  
  1128.  
  1129. Usage:
  1130. FImp <Source> [Target] [-M?|MODE?] [-XO|EXPLODEONLY] [-IO|IMPLODEONLY]
  1131.      [-RF|RUNFORMAT "..%s.."] [-AL|ARGLIST "stctsct..."] [-V|VERBOSE]
  1132.  
  1133. Modes range from 0 to 11.
  1134.  
  1135. FImp is a compress/uncompress command that allows you to reduce
  1136. the size of any file. The algorithms used are similar to those in
  1137. The Imploder; they sport a good compression ratio and blazing
  1138. decompression speed.
  1139. You can be easily customize FImp to operate transparently on files
  1140. in your environment.
  1141.  
  1142.  
  1143. Operation
  1144. ---------
  1145.  
  1146. If you don't specify a target file, FImp will try to replace the
  1147. file you specified, and will expect/create imploded files with a
  1148. .im extension. Suppose you have a file "test" in the current
  1149. directory, "FImp test" will cause it to be replaced with an
  1150. imploded file "test.im", and typing "FImp test" once more will
  1151. replace "test.im" with the exploded file "test".
  1152.  
  1153. Alternatively you can specify a target file or directory.
  1154. In the case of a complete target file specification, optionally
  1155. with preappended path, FImp will use both the source and target
  1156. without any modifications. If you specify only a target directory,
  1157. the filename part of the source will be used as a filename.
  1158.  
  1159. This works fine because FImp examines the file data to see whether
  1160. a file is imploded, and thus can determine if it should proceed with
  1161. imploding or exploding.
  1162.  
  1163. Note that the ".im" entension is only relevant when you don't
  1164. specify a target.  If you do, it will be neither appended while
  1165. imploding, nor removed when exploding to a directory.  This means
  1166. that it's up to you to specify the ".im" extension for the target
  1167. if you prefer to recognize the file type by way of the file name.
  1168. Both FInf and FImp have support for recognizing a file as having
  1169. been fimped by examining its contents, so if you use batchfiles or
  1170. pipe aliases to interface with whatever you've fimped there's no
  1171. need to use the ".im" extension. In any case, you can have it both
  1172. ways.
  1173.  
  1174. The NICE switch causes FImp to operate with a task priority of one
  1175. count lower than the one it was invoked with. The old priority will
  1176. be restored upon exit. Thus FImp will only eat the spare cycles
  1177. without bogging down the system.
  1178.  
  1179. If you use the VERBOSE switch, FImp will give a progress report
  1180. while compressing, and report on current activities like loading,
  1181. exploding etc.
  1182.  
  1183.  
  1184. Compression
  1185. -----------
  1186.  
  1187. FImp doesn't (yet) support streaming compression/decompression; the
  1188. file to be compressed needs to be loaded into a memory buffer.
  1189. As is the case with The Imploder, a special turbo compression mode
  1190. kicks in when you've about 300K memory left (more for higher
  1191. compression modes).  This will drastically speed up the implosion
  1192. process.
  1193.  
  1194. Decompression also requires a contiguous memory buffer as large as
  1195. the decompressed file, but doesn't require any memory in addition
  1196. to that. Before decompression, FImp performs a quick checksum to
  1197. make sure the file hasn't been corrupted.
  1198.  
  1199. By default what's most probably the optimal compression mode will
  1200. automatically be selected by FImp. If you want to override this, you
  1201. may specify the mode yourself using the "mode?" switches. Large
  1202. compression modes normally have a higher gain, but take more time,
  1203. and, in case of turbo compression, use up a lot of memory. The speed
  1204. differences between the various modes are quite large if no turbo
  1205. mode could be initiated due to lack of memory.
  1206.  
  1207. The large compression modes require quite a bit of memory in order
  1208. to be able to execute. If you have some free memory (>300K) but not
  1209. a whole lot, and yet want to ensure operation in turbo mode, the
  1210. best course of action is to override the automatic compression mode
  1211. selection with a relatively small value, e.g. MODE5.
  1212.  
  1213.  
  1214. Advanced Features
  1215. -----------------
  1216.  
  1217. FImp has a number of features that allow you to easily apply it to
  1218. customized tasks such as transparently decompressing imploded text
  1219. files and loading them into your editor.
  1220.  
  1221. The "ImplodeOnly" and "ExplodeOnly" switches allow only compression
  1222. or decompression respectively. Normally FImp decides by itself by
  1223. looking whether the file is already imploded.
  1224.  
  1225. Beyond the "RunFormat" keyword you may specify a command to be
  1226. executed when FImp has completed its operation. This isn't very
  1227. useful unless you can in some way pass on the files just processed
  1228. by FImp.
  1229. Therefore this "RunFormat" string allows PrintF like formatting;
  1230. Any "%s" format statements present in the string will be replaced
  1231. by a filename.
  1232.  
  1233. However if you use %s statements you'll also have to specify which
  1234. filename it should be replaced with. That's what the ArgList keyword
  1235. is all about. Beyond it you may specify a list containing only the
  1236. characters "s" and/or "c" or "t".  "c" and "t" are mutually exclusive.
  1237. The "s" stands for source, the "t" for target, and "c" for
  1238. conditional.
  1239. So the ArgList string "st" will replace the first occurance of %s
  1240. in the RunFormat string with the source path+filename, and the
  1241. second occurance of %s with the target path+filename.
  1242.  
  1243. Note that if you specify only a destination directory, a "t" will
  1244. still cause replacment by both the path and an appended filename
  1245. derived from the source file specification.
  1246.  
  1247. Now what's this conditional thing?
  1248. Well, if you don't know for sure whether a file has been imploded
  1249. and e.g. only care about doing something with the exploded version,
  1250. such as loading it into your editor, you can set the "ExplodeOnly"
  1251. switch to prevent the file from being imploded when it hasn't
  1252. already been imploded.
  1253. In this case you'd want FImp to also perform the RunFormat command
  1254. (probably containing an invocation string for your editor) even
  1255. though it didn't explode a thing. And you'd want the source file
  1256. to be loaded into your editor (The one that FImp found out was
  1257. already in a non-imploded state).
  1258.  
  1259. So this is what the "c" does; It replaces its respective "%s"
  1260. in the RunFormat string by the target file name if FImp exploded
  1261. or imploded the file. Yet when the file couldn't be processed
  1262. due to you setting the ExplodeOnly or ImplodeOnly switches,
  1263. the source file name will be used.
  1264.  
  1265. One last thing that needs to be mentioned is that the runformat
  1266. string supports escaping by means of the \ escape character.
  1267. Thus with \" you can include a quote in the runformat string,
  1268. and \n inserts a line feed.
  1269.  
  1270.  
  1271. Examples
  1272. --------
  1273.  
  1274. "FImp data"
  1275.  
  1276. Will implode the file "data" and replace it by data.im if the
  1277. file "data" hasen't been imploded already.
  1278. The same command will explode any file "data.im" if present and
  1279. replace the exploded version called "data". This way you can
  1280. toggle a file between its imploded and exploded state.
  1281.  
  1282.  
  1283. "FImp source target -rf "Delete %s" -al s"
  1284.  
  1285. This will implode or explode the file "source" to the file "target"
  1286. (depending on what state the source file is in) and delete the
  1287. source file, but only when the operation could be completed with
  1288. success.
  1289.  
  1290.  
  1291. The best thing to do is to define some aliases to hide the rather
  1292. longish commandlines from view;
  1293.  
  1294. Edx=FImp >NIL: [] T:Explode -XO -RF "Execute ExEdit %s" -AL "c"
  1295.  
  1296. This will execute a batchfile called ExEdit. This could contain
  1297. something like;
  1298.  
  1299. <---"S:ExEdit"
  1300. .key filepa/a
  1301.  
  1302. Edit <filepa>
  1303. Delete T:Explode/#?
  1304. <---
  1305.  
  1306. Thus conditionally loading either the exploded target or the never-
  1307. imploded-in-the-first-place source into an editor.
  1308. The delete command subsequently purges any intermediate files from
  1309. a subdirectory in T:.
  1310. Instead of using a batchfile, you may separate commands in the
  1311. RunFormat string by using \n line feeds. Still, batchfiles are
  1312. more flexible because of e.g. the If/Endif/Skip flow control.
  1313.  
  1314.  
  1315. FImp Fish:Contents Fish:Contents -IO
  1316.  
  1317. If you don't want to bother with re-imploding files when they
  1318. have been modified, you could add a list of these FImp statements
  1319. to your CronTab, thus causing re-implosion during nighttime.
  1320.  
  1321. As you can see, you may implode or explode a file to itself, but
  1322. you need to explicitly specify an identical source and target.
  1323. The original file will be deleted, and the new file written. This
  1324. results in a "window of vulnerability"; during the write operation
  1325. there is no backup of the file.
  1326. The replace mode (when you don't specify a target), is safe in this
  1327. sense. The source file will only be deleted after the target file has
  1328. been successfully written.
  1329.  
  1330.  
  1331. General Info
  1332. ------------
  1333.  
  1334. Don't think of FImp as a general purpose archiver. Rather it is
  1335. a quick and easy solution to compress single files. I don't endorse
  1336. FImped files as a "public" format. There's enough confusion already.
  1337.  
  1338. You might use FInf to "add" wildcarding capabilities to FImp,
  1339. or to preselect only FImped files from a directory.
  1340.  
  1341. The rationale behind all this is that by providing only the building
  1342. blocks, documentation and some examples, the user retains the freedom
  1343. to implement things as he/she sees fit.
  1344.  
  1345.  
  1346. FImp stands out because of its decompression speed. If you'd like
  1347. to compress external data used by a program you are writing, while
  1348. hardly incurring any performance penalty, consider using FImp.
  1349.  
  1350. If you query us, we'll provide you with the decompression routines
  1351. in linkable, object format. Note that decompression happens in-situ
  1352. and doesn't require any additional memory.
  1353.  
  1354. If you wish to make a program that deals with "public" data, e.g.
  1355. a text reader or a picture display program, you'd do best to wait
  1356. for the xpk library by Urban Mueller. This is an interface library
  1357. a la XPR to various compression algorithms. This way people will
  1358. have an easy way of decompressing this "public" data without having
  1359. to know about the various formats.
  1360.  
  1361.  
  1362. FImp is pure and can be made resident.
  1363. Enjoy.
  1364.  
  1365. # AJ
  1366.  
  1367. ***************************************************************************
  1368.  
  1369. ; You can use this alias to read an imploded document.
  1370. Alias EdExp FImp >NIL: [] T:Ex -XO -RF "Ed %s\nDelete T:Ex/#?" -AL C
  1371.  
  1372. ; This does the same thing apart from using FInf to add wildcarding for
  1373. ; loading multiple files.
  1374. Alias Edx FInf >NIL: [] -q -p -f -na -nh -lf "FImp %s T:Ex -XO -AL c -RF \"Ed %%s\\nDelete T:Ex/#?\"" BATCH
  1375.  
  1376. ***************************************************************************
  1377.  
  1378.  
  1379.  
  1380. File INFo manual
  1381. ================
  1382.  
  1383. File INFo V1.131         by Peter Struijk
  1384.  
  1385. Introduction
  1386. ------------
  1387.  
  1388. FInf is a very versatile directory listing utility.  It can examine the
  1389. contents of files and display a short type description.  In addition to
  1390. this, FInf has a whole slew of options that allow you to filter files by
  1391. type, date, age, size etc., as well as recursive directory descending,
  1392. and adjustable output formatting.  So next to simply listing
  1393. directories, FInf is extremely useful for creating hybrid commands that
  1394. perform functions closely tuned to your specific needs.
  1395.  
  1396.  
  1397.  
  1398. Command Line Arguments
  1399. ----------------------
  1400.  
  1401. Usage: FInf [file/dir] [-lf=LFORMAT ["..%s.."]] [-nl=NOLINE [prefix]]
  1402.   [EXE] [IMP] [DOC] [IFF] [NOI] [-t=TYPE string] [-nt=NOTYPE]
  1403.   [-na=NOANSI] [-nh=NOHEAD] [NEWER [object]] [OLDER [object]]
  1404.   [-d=DIRS] [-f=FILES] [-q=QUICK] [-p=PATH] [-a=ALL] [NOX] [NOC]
  1405.   [BLOCK(S)] [DATES] [-lt=LONGTYPE] [SUB string] [BATCH]
  1406.   [LARGER size] [SMALLER size] [SINCE [n] date] [UPTO [n] date]
  1407.   [-ho=HEADONLY]
  1408.  
  1409. Arguments surrounded by double-quotes are NOT recognized as keywords,
  1410. this, or the use of -??  shortcuts can help you circumvent problems with
  1411. identically named files and keywords.  Keywords/switches are case
  1412. independent.
  1413.  
  1414. FInf parses its arguments in a left to right order, which may cause
  1415. keywords to be overridden by keywords that occur later in the command
  1416. line.  E.g.  "FInf -nt doc" displays only text files while "FInf doc
  1417. -nt" will disable file type checking.
  1418.  
  1419. You may use the backslash "\" as a fixed escape character; If you enter
  1420. \n it will be replaced by a new-line, while \" implements a
  1421. double-quote.
  1422.  
  1423. FInf sets a returncode level of 20 (FAIL) on a serious error.  If no
  1424. errors occur, yet no matching file can be found, a returncode 5 (WARN)
  1425. will be set.
  1426.  
  1427.  
  1428. Examples
  1429. --------
  1430.  
  1431. In order to whet your appetite, I'll start with a few examples.  A
  1432. complete option reference is given later on.
  1433.  
  1434. Typing "FInf" without any options will display the files in the current
  1435. directory, e.g.
  1436.  
  1437. EM                         14228 --p-rwed 12-Jul-90 22:47:39 XLIB IMP
  1438. TeX                       130344 ----rwed 04-Feb-90 19:29:42 EXECUTABLE
  1439. Introduction                1918 ----rwed 21-Jul-90 15:23:12 ASCII TEXT
  1440. Read Me                     1532 ----rwed 22-Jul-90 16:31:52 ASCII TEXT
  1441. Graph                       4526 ----rwed 01-Jun-90 18:13:47 IFF PIC
  1442. Tmp  (dir)
  1443. 5 files - 1 directory - 307 blocks - 152548 bytes
  1444.  
  1445. Typing "FInf doc" will display all text files in the current directory,
  1446. and "FInf disk* exe" will show all executables starting with "disk".
  1447.  
  1448. If you use a shell that supports unnamed pipes and aliases, you can very
  1449. easily construct new commands as shown below.  If you do not have
  1450. unnamed pipes, you can use the BATCH option, the PIPE:  device or
  1451. temporary files to obtain equivalent though less elegant functionality.
  1452.  
  1453. The BATCH option will cause FInf to output to a temporary file and execute
  1454. the contents like a batchfile once it's done.  This will give you the
  1455. same functionality as single level unnamed pipes.
  1456.  
  1457. ------
  1458. E=FInf [] noi doc path files lformat " \"%s\"" noline ED | execute
  1459. or
  1460. E=FInf [] noi doc path files lformat " \"%s\"" noline ED batch
  1461.  
  1462. This alias will execute the command ED with a list of text files that
  1463. match any wildcards you specify. Typing "E" while in the directory shown
  1464. above would have executed the command `Ed "Introduction" "Read Me"'.
  1465. Note how escaping the quote character allows you to put quotes around
  1466. the produced filename, thus avoiding problems with filenames that have
  1467. spaces in them.
  1468.  
  1469. Do not be deterred by the numerous parameters. Aliases need to be
  1470. constructed only once, and when you are examining the requirements of
  1471. a new alias, you'll almost automatically conclude you're in need of
  1472. certain options. Chances are FInf provides them.
  1473.  
  1474.  
  1475. ------
  1476.  
  1477. find=FInf NOTYPE FILES QUICK NOHEAD NOANSI PATH ALL SUB []
  1478.  
  1479. or abbreviated:
  1480.  
  1481. find=FInf -nt -f -q -nh -na -p -a SUB []
  1482.  
  1483. This alias will search your current directory, and all subdirectories
  1484. for filenames that contain a string you specify.  You can search any
  1485. directory by specifying a directory name *after* the search string.
  1486. Very useful for finding files on your harddrive.  If a matching file is
  1487. found, the full path will be displayed.
  1488.  
  1489.  
  1490. ------
  1491. FInf *.c Quick Path All | Zoo aI <archive>
  1492.  
  1493. The I option in Zoo causes it to read filenames from the standard input,
  1494. and these are provided by FInf.  This particular example will archive
  1495. all C source files in the current directory and its subdirectories.
  1496.  
  1497.  
  1498.  
  1499. File Type Filtering Options
  1500. ---------------------------
  1501.  
  1502. FInf has a set of command line switches that causes it to display
  1503. only specific file types. Here's a list:
  1504.  
  1505.  
  1506. -t=TYPE <string>
  1507.  
  1508. When FInf recognizes a file, it is able to print a string describing its
  1509. type.  The TYPE option allows you to display only those files where the
  1510. pattern <string> occurs in this file type description.  This keyword can
  1511. be used to select virtuallly any file type or groups of file types just
  1512. by supplying a carefully chosen <string>.  Note that the LONGTYPE option
  1513. causes FInf to search the extended file type description instead of
  1514. searching the short description.
  1515.  
  1516. List of currently recognized file types:
  1517.  
  1518. The following list can be generated by "FInf ?" followed by another "?"
  1519. at the ":" prompt.  FInf's file type recognition is not by any means
  1520. complete and even a bit outdated but serves well to distinguish between
  1521. major groups of files like e.g.  executables, text, iff.
  1522.  
  1523. SHORT         LONG
  1524.  
  1525. UNREADABLE    "Unable to read"
  1526. UNKNOWN       "Unknown type"
  1527. FIMP DATA     "FImp data file"
  1528. OBJ CODE      "Linkable object code"
  1529. TTW PIC       "TTW picture"
  1530. PW DATA       "PowerWindows data"
  1531. DIMP DATA     "DImp data file"
  1532. IFF PIC       "IFF picture"
  1533. IFF SOUND     "IFF sound"
  1534. IFF SCORE     "IFF score"
  1535. IFF TEXT      "IFF text"
  1536. IFF DMS       "IFF Deluxe Music score"
  1537. IFF ANI       "IFF animation"
  1538. IFF S3D       "IFF Sculpt 3D scene"
  1539. IFF DLV       "IFF Deluxe Video"
  1540. IFF DOC       "IFF document"
  1541. IFF FILE      "IFF data file"
  1542. ASCII TEXT    "ASCII Text"
  1543. OLD IMP       "Old imploded"
  1544. NORM IMP      "Normal imploded"
  1545. PURE IMP      "Pure imploded"
  1546. OVLY IMP      "Overlayed imploded"
  1547. XLIB IMP      "Library imploded"
  1548. XLIB IMP!     "Short library imploded"
  1549. EXECUTABLE    "Executable"
  1550. OVERLAYED     "Overlayed executable"
  1551. NORM IMP*     "Protected normal imploded"
  1552. PURE IMP*     "Protected pure imploded"
  1553. OVLY IMP*     "Protected overlayed imploded"
  1554. XLIB IMP*     "Protected library imploded"
  1555. FONT HDR      "Font header"
  1556. WB ICON       "WB icon"
  1557. DISK ICON     "WB disk icon"
  1558. DRAWER        "WB drawer icon"
  1559. TOOL          "WB tool icon"
  1560. PROJECT       "WB project icon"
  1561. GARBAGE       "WB garbage icon"
  1562. DEVS ICON     "WB device icon"
  1563. KICK ICON     "WB kick icon"
  1564.  
  1565.  
  1566. In addition to filtering file types with the TYPE option there are a
  1567. number of often used types that may be directly specified by keyword.
  1568. These are:
  1569.  
  1570. EXE - Display executable files (except imploded executables).
  1571. IMP - Display imploded files and imploded data files.
  1572. DOC - Display ASCII text files.
  1573. IFF - Display all kinds of IFF files. You may also use the TYPE keyword
  1574.       to accomplish further differentation.
  1575.  
  1576.  
  1577.  
  1578. Other Filtering Options
  1579. -----------------------
  1580.  
  1581. In addition to type filtering, FInf can also examine other properties
  1582. with which to exempt certain files from being displayed:
  1583.  
  1584. NEWER <object>
  1585. Display only objects which were created after or at the same time as
  1586. <object>.
  1587.  
  1588. OLDER <object>
  1589. Display only objects which were created before or at the same time
  1590. as <object>.
  1591.  
  1592. UPTO <date>
  1593. Display only those objects created UPTO a specified date. UPTO accepts
  1594. three formats:
  1595.     DD-MMM-YY
  1596.     TODAY/YESTERDAY/TOMORROW/MONDAY...SUNDAY/FUTURE
  1597.     [n] TICK(s)/SECOND(s)/MINUTE(s)/HOUR(s)/DAY(s)/WEEK(s)/MONTH(s)/YEAR(s)
  1598. The integer [n] is optional, default is 1. The latter option is
  1599. extremely handy to cleanup your news directory.
  1600. E.g. FInf NEWS: -a -p -lf "Delete %s" UPTO 8 WEEKS BATCH
  1601. Make sure that your system clock contains the correct time! :-)
  1602.  
  1603. SINCE <date>
  1604. Display only object since a specified date. For information on the date
  1605. formats see UPTO.
  1606.  
  1607. LARGER <integer>
  1608. Display only files with a size smaller than or equal to <integer> bytes.
  1609.  
  1610. SMALLER <integer>
  1611. Display only files with a size smaller or equal than <integer> bytes.
  1612.  
  1613. SUB <string>
  1614. Display only objects containing at least one occurance of <string> in their
  1615. objectname.
  1616.  
  1617. NOI
  1618. Do not display .info files.
  1619.  
  1620. -d=DIRS
  1621. Display directories only.
  1622.  
  1623. -f=FILES
  1624. Display only files.
  1625.  
  1626. -a=ALL
  1627. Recursively displays the contents of any subdirectories in addition to
  1628. the files/dirs in the current directory.  Wildcards in the path description
  1629. are not supported (yet), so for now this option will cause FInf to
  1630. recursively enter ALL encountered directories.
  1631.  
  1632.  
  1633.  
  1634. Formatting Options
  1635. ------------------
  1636.  
  1637. These switches and keywords control the way in which FInf generates its
  1638. output:
  1639.  
  1640.  
  1641. BATCH
  1642.  
  1643. This will capture FInf's output into a uniquely named temporary file in
  1644. the T: directory, and subsequently will execute the file as a batch file
  1645. that will be deleted after completion.
  1646. This option is handy if you don't have unnamed pipes and something like
  1647. the ARP execute command which will execute any commands piped to it.
  1648.  
  1649.  
  1650. BLOCK=BLOCKS
  1651.  
  1652. This switch will cause FInf to display the number of blocks files occupy
  1653. on disk instead of their lengths.  Note that for devices using the fast
  1654. filing system, this value will include any extension blocks.
  1655.  
  1656.  
  1657. DATES
  1658.  
  1659. This will cause FInf to print absolute dates instead of dates with
  1660. "Yesterday" of "Sunday" in them.
  1661.  
  1662.  
  1663. -lt=LONGTYPE
  1664.  
  1665. If specified, FInf will generate listings with a more verbose type
  1666. description.  In order to create printing space for this, the date and
  1667. protection flags will not be displayed.
  1668.  
  1669.  
  1670. -nt=NOTYPE
  1671.  
  1672. If you use this switch, the contents of files will not be examined.  The
  1673. type description will therefore not be displayed.  The EXE, IMP, DOC,
  1674. IFF etc.  filters won't work if NOTYPE is set.  NOTYPE will cause FInf
  1675. to operate about twice as fast because of the decreased amount of work
  1676. it has to do for each file.
  1677.  
  1678.  
  1679. -na=NOANSI
  1680.  
  1681. This surpresses the generation of ANSI codes used by FInf to select bold
  1682. or italic font styles in the footer and such.
  1683.  
  1684.  
  1685. -nh=NOHEAD
  1686.  
  1687. Like with the normal List command, NoHead will stop FInf from generating
  1688. headers/footers with additional information on the examined files.
  1689.  
  1690. -ho=HEADONLY
  1691.  
  1692. This option is included to quickly simulate the unix DU command.
  1693. DU stands for Directory Usage, an example alias:
  1694. du = finf -ho -a []
  1695.  
  1696.  
  1697. NOX
  1698.  
  1699. This option removes extensions from the filenames.  This might be handy
  1700. when you only wish to pass the filename root into the LFormat output.
  1701. E.g.  FInf *.twiddle NOX LFormat "Rename %s.twiddle %s.twaddle" |
  1702. execute changes all .twiddle extensions into .twaddle extensions.
  1703.  
  1704.  
  1705. NOC
  1706.  
  1707. This simple option tells FInf to NOT print any filenotes (comments)
  1708. which might be attached to a file or directory.  Note that when the
  1709. QUICK option is in effect filenotes are already been ignored.
  1710.  
  1711.  
  1712. -q=QUICK
  1713.  
  1714. In quick mode, FInf will display only filenames and any paths.  No
  1715. lengths, flags, dates, comments or types will be printed, the type
  1716. filter switches will still function though.  These bare (path+)file
  1717. names can be more readily used by programs you intend to feed FInf's
  1718. output to.
  1719.  
  1720.  
  1721. -p=PATH
  1722.  
  1723. If set, a full path will be pasted in front of any displayed filenames.
  1724. This option is useful e.g. in conjunction with the LFormat or ALL
  1725. switches.
  1726.  
  1727.  
  1728. -lf=LFORMAT <"...%s...%s...">
  1729.  
  1730. Works like List's LFormat option.  Briefly, you can specify a string
  1731. with a "%s" in it (up to 8 %s expansions are supported), and where FInf
  1732. normally would have printed paths+file names, it displays the given
  1733. string with the path + file at the %s location.  Useful for pasting
  1734. commands in front of filenames so you can pipe the output of FInf to a
  1735. batchfile, or directly to execute (if your shell supports this).  E.g.
  1736. FInf LFORMAT "rename \"%s\" \"%s.doc\"" FILES DOC BATCH will append a
  1737. ".doc" extension to all ASCII files found.  Note:  LFormat automatically
  1738. causes the Quick, NoAnsi and Nohead switch modes to be selected.
  1739.  
  1740.  
  1741. -nl=NOLINE [prefix]
  1742.  
  1743. This causes FInf not to print linefeeds between filenames.  If you use
  1744. this together with a LFormat " %s" and a QUICK switch, you'll get a line
  1745. with file names separated by spaces.  In the prefix position you may
  1746. optionally specify a string to be pasted in front of this line.  This
  1747. will probably be the name of a command which requires a list of
  1748. filenames as its parameters.  Note that this line will only be printed
  1749. if any filenames matching your wildcard specification were found.  E.g.
  1750. FInf NOLINE "Ed " LFORMAT "\"%s\" " PATH FILES
  1751. will produce something like:  Ed "ram:file1" "ram:doc1" "ram:readme"
  1752.  
  1753.  
  1754. General Information
  1755. -------------------
  1756.  
  1757. This program is Freely-Distributable, as opposed to Public Domain.
  1758. Permission is given to freely distribute this program provided you
  1759. include this documentation and any other related files, and no fee is
  1760. charged in excess of reasonable media and mailing costs.
  1761.  
  1762. Currently FInf supports the #,?  and * wild cards.  OS 2.0 wildcarding
  1763. will be implemented sometime in the future.  Also high on the wish list
  1764. is a SORT option switch.  If, during normal operation, there is only one
  1765. file matching the file/wildcard specification, and it is a program file,
  1766. some additional information about the number of hunks and the memory usage
  1767. will be displayed.  FInf has a lot of switches, so there's a chance that
  1768. you might want to examine a file or directory that has the same name as
  1769. one of these switches.  You can inform FInf that the object you
  1770. specified isn't a switch by putting quotes "" around it.
  1771.  
  1772. FInf is pure and can be made resident.  Enjoy.
  1773.  
  1774.  
  1775. ***************************************************************************
  1776.  
  1777. ; This batchfile demonstrates how to use FInf and FImp in making a "man" online
  1778. ; documentation batchfile.
  1779. ; FInf is used for scanning the manual directories. The documentation files
  1780. ; may be (but need not be) imploded using FImp. Directories are used to
  1781. ; differentiate between the different reader programs required to display the
  1782. ; various files.
  1783.  
  1784. .key manus/a
  1785. .bra {
  1786. .ket }
  1787.  
  1788. FInf Man:{manus} -q -p -f -nh -na -lf "FImp >NIL: %s T:Ex -XO -AL c -RF \"Ed %%s\\nDelete T:Ex/#?\"" BATCH
  1789.  
  1790. FInf Man:ANSI/{manus} -q -p -f -nh -na -lf "FImp >NIL: %s T:Ex -XO -AL c -RF \"More %%s\\nWait 1 sec\\nDelete T:Ex/#?\"" BATCH
  1791.  
  1792. FInf Man:IFF/{manus} -q -p -f -nh -na -lf "FImp >NIL: %s T:Ex -XO -AL c -RF \"Run Leggi %%s smart font topaz/8\\nWait 2 secs\\nDelete T:Ex/#?\"" BATCH
  1793.  
  1794. ***************************************************************************
  1795.  
  1796.